package com.foreveross.mofang.serviceconsole.web.controller.core;

import javax.inject.Inject;

import org.dayatang.querychannel.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.foreveross.mofang.serviceconsole.application.core.NodeRegisterApplication;
import com.foreveross.mofang.serviceconsole.application.dto.NodeRegisterDTO;
import com.foreveross.mofang.serviceconsole.web.controller.common.BaseController;

/**
 * 结点报道实controller层
 * 
 * @author fb
 *
 */
@SuppressWarnings("rawtypes")
@Controller
@RequestMapping("/core/NodeRegister")
public class NodeRegisterController extends BaseController{
		
	@Inject
	private NodeRegisterApplication nodeRegisterApplication;
	
	@ResponseBody
	@RequestMapping("/pageQueryNewestNode")
	public Page pageQueryNewestNode(NodeRegisterDTO nodeRegister, @RequestParam int page, @RequestParam int pagesize) {
		Page<NodeRegisterDTO> all = nodeRegisterApplication.pageQueryNewestNode(nodeRegister, page, pagesize);
		return all;
	}
	
	@ResponseBody
	@RequestMapping("/pageQueryNode")
	public Page pageQueryNode(@RequestParam String nodeSn, @RequestParam int page, @RequestParam int pagesize) {
		Page<NodeRegisterDTO> all = nodeRegisterApplication.pageQueryNode(nodeSn, page, pagesize);
		return all;
	}
	
}
